<template>
  <a-select :value="value" :mode="mode" @change="onChange" :placeholder="placeholder" :labelInValue="mode === 'default' ? true : false">
    <a-select-option key="1" value="1周">1周</a-select-option>
    <a-select-option key="2" value="1月">1月</a-select-option>
    <a-select-option key="3" value="3月">3月</a-select-option>
    <a-select-option key="4" value="6月">6月</a-select-option>
    <a-select-option key="5" value="1年">1年</a-select-option>
  </a-select>
</template>

<script>
export default {
  props: {
    value: {
      type: [String, Object],
      default: () => undefined
    },
    placeholder: {
      type: String,
      default: '请选择周期'
    },
    mode: {
      type: String,
      default: 'default'
    }
  },
  model: {
    prop: 'value',
    event: 'change'
  },
  components: {
  },
  data () {
    return {

    }
  },
  methods: {
    onChange (value, option) {
      this.$emit('change', value, option)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
